package com.sun.mybatisplus.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.sun.mybatisplus.entity.SysUser;
import com.sun.mybatisplus.service.DynamicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Auth: syh
 * @Date: 2021/10/19 10:39
 * @Email: 1014170249@qq.com
 * @Desc: 不在能知，而在能行
 * 测试多数据源
 */
@RestController
public class DynamicController {

    @Autowired
    private DynamicService dynamicService;

    /**
     * 查询所有
     * @return
     */
    @RequestMapping("/dynamic")
    public List<SysUser> findAll() {
       return dynamicService.list();
    }
}
